package Bussiness;

import Controller.Search;
import Model.LopHoc;
import Model.SinhVien;
import Model.Users;

import java.util.Vector;


/**
 *
 * Nhóm java lớp PNV2T - Nguyễn Thị Lệ Đài - Nguyễn Chí Hướng
 */
public class Search_Action {
    
    Search search = null;
    Vector vec = null;
    /** Creates a new instance of Search_Action */
    public Search_Action() {
        search = new Search();
    }
    
    public boolean isLogin(String UserName, String Password){
        if (search.isLogin(UserName,Password)==true)
            return true;
        return false;
    }
    
    public Vector DanhSachKhoaHoc(){
        vec=search.DanhSachKhoaHoc();
        return vec;
    }
    
    public Vector DanhSachLopHoc(int type, int khoa){
        vec=search.DanhSachLopHoc(type, khoa);
        return vec;
    }
    public Vector DanhSachLopHocChiTiet(int type,int MaKhoa,String KeyName){
        vec=search.DanhSachLopHocChiTiet(type,MaKhoa,KeyName);
        return vec;
    }
    
    public Vector DanhSachSinhVien(int type,int MaLop,String KeyName){
        vec=search.DanhSachSinhVien(type,MaLop,KeyName);
        return vec;
    }
    
    public String MaSVGanNhat(){
        return search.MaSVGanNhat();
    }
    
    public boolean KiemTraMaSV(String MaSV){
        return search.KiemTraMaSV(MaSV);
    }
    
    public boolean KiemTraBangDiem(int MaSV,int MaMon){
        return search.KiemTraBangDiem(MaSV,MaMon);
    }
    
    public boolean KiemTraMon(int MaMon){
        return search.KiemTraMon(MaMon);
    }
    
    public boolean KiemTraSVBangDiem(int MaSV){
        return search.KiemTraSVBangDiem(MaSV);
    }
    
    public boolean KiemTraLopHoc(int MaLop){
        return search.KiemTraLopHoc(MaLop);
    }
    
    public boolean KiemTraKhoaHoc(int MaKhoa){
        return search.KiemTraKhoaHoc(MaKhoa);
    }
    
    public SinhVien getSinhVien(String MaSV){
        return search.getSinhVien(MaSV);
    }
    
    public Vector DanhSachMonHoc(){
        vec=search.DanhSachMonHoc();
        return vec;
    }
    
    public Vector BangDiemSinhVien(int MaSV){
        vec=search.BangDiemSinhVien(MaSV);
        return vec;
    }
    public LopHoc getLop(int ID){
        return search.getLop(ID);
    }    
    
    public void Close(){
        search.CloseData();
    }

	public int getCourseId(String courseName) {
		return search.getCourseId(courseName);
	}

	public Vector DanhSachNguoiDung() {
		vec = search.DanhSachNguoiDung();
		return vec;
	}

	public String XacNhanTaiKhoan(String taiKhoan, String tenXacNhan) {
		return search.XacNhanTaiKhoan(taiKhoan, tenXacNhan);
	}

	public Users getUser(String userName, String passWord) {
		return search.getUser(userName, passWord);
	}

	public Vector getListStudentOfClass(String maLop, int types) {
		return search.getListStudentOfClass(maLop, types);
	}

}
